using System.Collections.Generic;

namespace MappingGenerator.Formatting
{
    public abstract class StringFormatter
    {
        public List<string> PreFixes { get; private set; }

        protected StringFormatter()
        {
            PreFixes = new List<string>();
        }

        public abstract string Convert(string name);
        protected string RemovePrefixes(string input)
        {
            foreach (var tableNamePreFix in PreFixes)
            {
                if (input.StartsWith(tableNamePreFix))
                    return input.Substring(tableNamePreFix.Length);
            }
            return input;
        }
    }
}